package com.supermap.dubbo.client.gwfs.util;


import com.alibaba.fastjson.JSONObject;
import com.supermap.dubbo.client.gwfs.wdsl.CXFDataShareServiceLocator;
import com.supermap.dubbo.client.gwfs.wdsl.CXFDataShareServiceSoapBindingStub;

import javax.xml.rpc.ServiceException;

/**
 * @author xiaolu
 * @date 2018/6/7 下午3:01
 */
public class GWFSWsdlServiceFactory {
    /**
     * 命名空间
     */
    private final static String NS = "http://tempuri.org/";

    public static void main(String args[]) throws Exception {

        CXFDataShareServiceSoapBindingStub stub = GWFSWsdlServiceFactory.getCXFDataSharePort();
        JSONObject jsonObject = new JSONObject();
//        stub.QXTA_GWFS_getWeatherPhenomenaInGridWithCoordinate()
//        stub.QXTA_GWFS_getGridDataWithCoordinate()
        System.out.println(jsonObject.toJSONString());

    }


    public static CXFDataShareServiceSoapBindingStub getCXFDataSharePort() {
        CXFDataShareServiceSoapBindingStub stub = null;
        try {
            stub = (CXFDataShareServiceSoapBindingStub) new CXFDataShareServiceLocator().getCXFDataSharePort();
        } catch (ServiceException e) {
            e.printStackTrace();
        }
        return stub;
    }
}
